]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: Use entry to show question texts
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 6 Feb 2020 19:57:53 +0000 (16:57 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 12 Feb 2020 19:29:48 +0000 (19:29 +0000)
Currently, there is a dedicated label above the entry to
display the question text. According to the new mockups
for the lock screen, this label doesn't exist; instead,
the question is set inside the entry itself, as a hint
text.

Set the questions as hint texts of the entry, and remove
the now unused label.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922

js/gdm/authPrompt.js

index 6dc914a039ec1a9176fe10c787735e23bef8f830..82852207eff06c5fe5bbb6da7377ebc49b13ad85 100644 (file)
@@ -89,13 +89,6 @@ var AuthPrompt = GObject.registerClass({
             y_expand: true,
         });
         this.add_child(this._userWell);
-        this._label = new St.Label({
-            style_class: 'login-dialog-prompt-label',
-            x_expand: false,
-            y_expand: true,
-        });
-
-        this.add_child(this._label);
 
         this._initEntryRow();
 
@@ -346,11 +339,9 @@ var AuthPrompt = GObject.registerClass({
     }
 
     setQuestion(question) {
-        this._label.set_text(question);
+        this._entry.hint_text = question;
 
-        this._label.show();
         this._entry.show();
-
         this._entry.grab_key_focus();
     }